package esnipe2;

public interface EbayAPI {

	public boolean startSession(String userid, String pass);
        
        public boolean closeSession();
        
        /* Set these (public)fields of item:
         *  -(String)item.itemName(e.g. "Keurig B145 Office Pro 1 Cups Espresso Machine")
         *  -(double)item.currentPrice
         *  -(java.util.Calendar)item.endTime
         * (only (String)item.url should be used)
         * return true if all 3 fields are successfully set
         */
        public boolean getItemInfo(EbayItem item);
        
        /* Get current item price, 
         * (used for updating item.currentPrice)
         * set .valid member to false if not successfully get
         */
        public Pricepair getCurrentPrice(String url);
        
        /* Get auction result, return
         * RESULT_WON   if user is the winner
         * RESULT_LOST  if user is not the winner
         * RESULT_NOTEND    if auction is not finished
         * RESULT_UNKNOWN   if result cannot be retrieved
         */
        public ItemResult getResult(String url);
        
        /* Place bid, return true if succeed
         * otherwise return false
         */
	public boolean placeBid(String url, double val);
}
